package view.comprobante;

import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.GridLayout;
import java.awt.Insets;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.text.ParseException;
import java.util.Observable;
import java.util.Observer;

import javax.swing.BorderFactory;
import javax.swing.BoxLayout;
import javax.swing.JFormattedTextField;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JPanel;
import javax.swing.JPopupMenu;
import javax.swing.JScrollPane;
import javax.swing.JSplitPane;
import javax.swing.JTable;
import javax.swing.JTextField;
import javax.swing.border.TitledBorder;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.text.MaskFormatter;

import controlador.TablaComprobantesController;


public class GeneracionComprobanteView extends JFrame implements Observer{

        /**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
		private JPanel jContentPanePrincipal = null;
        private JPanel jPanel = null;
        private JSplitPane jSplitPane = null;
        private JPanel jPanel1 = null;
        private JPanel jPanel2 = null;
        private JScrollPane jScrollPaneTabla = null;
        private JTable jTableOrdenes = null;
        private JPanel jPanelFiltrosConsulta = null;
        private JLabel jLabelCliente = null;
        private JTextField jTxtClienteDato = null;
        private JLabel jLabelVehiculo = null;
        private JPanel jPanelSeleccionVehiculo;
        private JMenuBar jJMenuBar = null;
        private JMenu jMenuArchivo = null;
        
        private JSplitPane jSplitPaneResultados = null;
        private JPanel jPanelResultadosIzq = null;
        private JLabel jLabelCantidadRegistros = null;
        private JLabel jLabelResultadoCantidadRegistros = null;
        private JPanel jPanelDerResultados = null;
        private JPanel jPanelResultados = null;
        private JSplitPane jSplitPaneDerechoDerecho = null;
        private JPanel jPanelDerechoDIqzq = null;
        private JPanel jPanelDerechoDer = null;
        private JLabel jLabelUsuarioLogueado = null;
        private JLabel jLabelUsuarioLogueadoDato = null;
        private JPopupMenu popUpmenu;
        private JMenuItem jMenuExportar = null;
		private JLabel jLabelRazonSocialCliente = null;
		private JTextField jTxtRazonSocialDato = null;
		private JLabel jLabelTelefonoCliente1 = null;
		private JTextField jTxtTelefonoDato1 = null;
		private MaskFormatter mascara1 = null;
		private JPanel jPanelFechas = null;
		private JLabel jLabelDesde = null;
		private JFormattedTextField jTxtFechaDesde = null;
		private MaskFormatter mascara = null;
		private MaskFormatter mascara2 = null;
		private JLabel jLabelHasta1 = null;
		private JFormattedTextField jTxtFechaHasta1 = null;
		private MaskFormatter mascara11 = null;
		private JLabel jLabelDireccionCliente11 = null;
		private JTextField jTxtDireccionDato11 = null;
		private JLabel jLabelEmailCliente111 = null;
		private TablaComprobantesController tablaComprobantesController;
        /**
         * This method initializes 
         * 
         */
        public GeneracionComprobanteView() {
                super();
                //variables
        		this.tablaComprobantesController = new TablaComprobantesController();
        		
                initialize();
                
                deshabilitarPaneles();
                completarLabelUsuarioLogueado();
        }

        private void completarLabelUsuarioLogueado() {
        }

        private void deshabilitarPaneles() {
                habilitarPanelFechasDesde(false);
                habilitarPanelVehiculo(false);
                habilitarPanelFechasHasta(false);
        }

        /**
         * This method initializes this
         * 
         */
        private void initialize() {
        this.setSize(new Dimension(895, 754));
        this.setJMenuBar(getJJMenuBar());
        this.setLocationRelativeTo(null);
        this.setTitle("Consulta Comprobantes");
        this.setContentPane(getJContentPanePrincipal());
        setExtendedState(JFrame.MAXIMIZED_BOTH);
        }

        /**
         * This method initializes jCobtentPanePrincipal        
         *      
         * @return javax.swing.JPanel   
         */
        private JPanel getJContentPanePrincipal() {
                if (jContentPanePrincipal == null) {
                        GridLayout gridLayout = new GridLayout();
                        gridLayout.setRows(1);
                        jContentPanePrincipal = new JPanel();
                        jContentPanePrincipal.setLayout(gridLayout);
                        jContentPanePrincipal.add(getJPanel(), null);
                }
                return jContentPanePrincipal;
        }

        /**
         * This method initializes jPanel       
         *      
         * @return javax.swing.JPanel   
         */
        private JPanel getJPanel() {
                if (jPanel == null) {
                        jPanel = new JPanel();
                        jPanel.setLayout(new BoxLayout(getJPanel(), BoxLayout.Y_AXIS));
                        jPanel.add(getJSplitPane(), null);
                }
                return jPanel;
        }

        /**
         * This method initializes jSplitPane   
         *      
         * @return javax.swing.JSplitPane       
         */
        private JSplitPane getJSplitPane() {
                if (jSplitPane == null) {
                        jSplitPane = new JSplitPane();
                        jSplitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
                        jSplitPane.setBottomComponent(getJPanel2());
                        jSplitPane.setTopComponent(getJPanel1());
                }
                return jSplitPane;
        }

        /**
         * This method initializes jPanel1      
         *      
         * @return javax.swing.JPanel   
         */
        private JPanel getJPanel1() {
                if (jPanel1 == null) {
                        jPanel1 = new JPanel();
                        jPanel1.setLayout(null);
                        jPanel1.setPreferredSize(new Dimension(1, 200));
                        jPanel1.setBorder(BorderFactory.createLineBorder(Color.gray, 2));
                        jPanel1.add(getJPanelFiltrosConsulta(), null);
                        try {
							jPanel1.add(getJPanelFechas(), null);
						} catch (ParseException e) {
							// TODO Auto-generated catch block
							e.printStackTrace();
						}
                }
                return jPanel1;
        }

        /**
         * This method initializes jPanel2      
         *      
         * @return javax.swing.JPanel   
         */
        private JPanel getJPanel2() {
                if (jPanel2 == null) {
                        GridBagConstraints gridBagConstraints4 = new GridBagConstraints();
                        gridBagConstraints4.insets = new Insets(2, 0, 0, 0);
                        gridBagConstraints4.gridy = 1;
                        gridBagConstraints4.ipadx = 872;
                        gridBagConstraints4.gridx = 0;
                        GridBagConstraints gridBagConstraints3 = new GridBagConstraints();
                        gridBagConstraints3.fill = GridBagConstraints.BOTH;
                        gridBagConstraints3.gridx = 0;
                        gridBagConstraints3.gridy = 0;
                        gridBagConstraints3.ipadx = 1077;
                        gridBagConstraints3.weightx = 1.0;
                        gridBagConstraints3.weighty = 1.0;
                        gridBagConstraints3.insets = new Insets(0, 0, 1, 0);
                        jPanel2 = new JPanel();
                        jPanel2.setLayout(new GridBagLayout());
                        jPanel2.setBorder(BorderFactory.createLineBorder(Color.gray, 2));
                        jPanel2.setPreferredSize(new Dimension(550, 300));
                        jPanel2.add(getJScrollPaneTabla(), gridBagConstraints3);
                        jPanel2.add(getJPanelResultados(), gridBagConstraints4);
                }
                return jPanel2;
        }

        /**
         * This method initializes jScrollPaneTabla     
         *      
         * @return javax.swing.JScrollPane      
         */
        private JScrollPane getJScrollPaneTabla() {
                if (jScrollPaneTabla == null) {
                        jScrollPaneTabla = new JScrollPane();
//                        jScrollPaneTabla.setLayout(new BoxLayout(getJScrollPaneTabla(), BoxLayout.X_AXIS));
                        jScrollPaneTabla.setPreferredSize(new Dimension(3, 500));
                        jScrollPaneTabla.setViewportView(getJTableOrdenes());
                }
                return jScrollPaneTabla;
        }

        /**
         * This method initializes jTableOrdenes        
         *      
         * @return javax.swing.JTable   
         */
        private JTable getJTableOrdenes() {
                if (jTableOrdenes == null) {
                			jTableOrdenes =  new JTable(this.tablaComprobantesController.getTableModel());
//                        jTableOrdenes = new JTable(consultaOrdenesController.getTableModel());
//                        jTableOrdenes.setDefaultRenderer (Object.class, new MiRenderRepuestos());
//                        /* para el filtrado de la tabla */
//                        jTableOrdenes.setRowSorter (new TableRowSorter(consultaOrdenesController.getTableModel()));
                        /*  ****** */

                        armarPopUpMenu();
                        
                        jTableOrdenes.addMouseListener(new java.awt.event.MouseAdapter() {
                                public void mouseClicked(java.awt.event.MouseEvent e) {
                                        
                                        if(jTableOrdenes.isEnabled()){
                                                
                                        if( e.getButton() == java.awt.event.MouseEvent.BUTTON3 )
                                        {
                                                popUpmenu.show(e.getComponent(), e.getX(), e.getY());
//                                              //esto le dice donde se tiene que mostrar
                                                
                                                        popUpmenu.setVisible(true);     
                                                }
                                        }
                                }
                        });                                     
                }
                return jTableOrdenes;
        }

        //popup de la tabla de ordenes
        public void armarPopUpMenu() {
                this.popUpmenu = new JPopupMenu();
                
                        JMenuItem menuItem = new JMenuItem("Consultar Orden");
                        this.popUpmenu.add(menuItem);
                        JMenuItem menuItem1 = new JMenuItem("Ficha del cliente");
                        this.popUpmenu.add(menuItem1);
                        
                        
                        menuItem.addActionListener(new ActionListener(){
                                @Override
                                public void actionPerformed(ActionEvent e) {

                                }
                        });
                        menuItem1.addActionListener(new ActionListener(){
                                @Override
                                public void actionPerformed(ActionEvent e) {
                                }
                        });
                }

        /**
         * This method initializes jPanelFiltrosConsulta        
         *      
         * @return javax.swing.JPanel   
         */
        private JPanel getJPanelFiltrosConsulta() {
                if (jPanelFiltrosConsulta == null) {
                        jLabelEmailCliente111 = new JLabel();
                        jLabelEmailCliente111.setBounds(new Rectangle(28, 23, 120, 16));
                        jLabelEmailCliente111.setText("Codigo Cliente");
                        jLabelDireccionCliente11 = new JLabel();
                        jLabelDireccionCliente11.setBounds(new Rectangle(511, 47, 78, 16));
                        jLabelDireccionCliente11.setText("Direccion");
                        jLabelTelefonoCliente1 = new JLabel();
                        jLabelTelefonoCliente1.setBounds(new Rectangle(300, 46, 73, 16));
                        jLabelTelefonoCliente1.setText("Telefono");
                        jLabelRazonSocialCliente = new JLabel();
                        jLabelRazonSocialCliente.setBounds(new Rectangle(27, 48, 130, 16));
                        jLabelRazonSocialCliente.setText("Razon Social");
                        jPanelFiltrosConsulta = new JPanel();
                        jPanelFiltrosConsulta.setLayout(null);
                        jPanelFiltrosConsulta.setBounds(new Rectangle(23, 13, 847, 97));
                        jPanelFiltrosConsulta.setBorder(BorderFactory.createTitledBorder(null, "Datos del cliente", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, new Font("Dialog", Font.BOLD, 12), new Color(51, 51, 51)));
//                        jPanelFiltrosConsulta.add(jLabelCliente, null);
                        jPanelFiltrosConsulta.add(getJTxtClienteDato(), null);
                        jPanelFiltrosConsulta.add(jLabelRazonSocialCliente, null);
                        jPanelFiltrosConsulta.add(getJTxtRazonSocialDato(), null);
                        jPanelFiltrosConsulta.add(jLabelTelefonoCliente1, null);
                        jPanelFiltrosConsulta.add(getJTxtTelefonoDato1(), null);
                        jPanelFiltrosConsulta.add(jLabelDireccionCliente11, null);
                        jPanelFiltrosConsulta.add(getJTxtDireccionDato11(), null);
                        jPanelFiltrosConsulta.add(jLabelEmailCliente111, null);
                }
                return jPanelFiltrosConsulta;
        }

        /**
         * This method initializes jPanelSeleccionCliente       
         *      
         * @return javax.swing.JPanel   
         */

        /**
         * This method initializes jTxtClienteDato      
         *      
         * @return javax.swing.JTextField       
         */
        private JTextField getJTxtClienteDato() {
                if (jTxtClienteDato == null) {
                        jTxtClienteDato = new JTextField();
                        jTxtClienteDato.setBounds(new Rectangle(163, 21, 85, 20));
                }
                return jTxtClienteDato;
        }

//        private void habilitarPanelCliente(boolean b) {
//                jLabelCliente.setEnabled(b);
//                jTxtClienteDato.setEnabled(b);
//        }

        private void habilitarPanelVehiculo(boolean b) {
        }

        private void habilitarPanelFechasDesde(boolean b) {
                jLabelDesde.setEnabled(b);
                jTxtFechaDesde.setEnabled(b);
        }
        private void habilitarPanelFechasHasta(boolean b){

        }

        /**
         * This method initializes jJMenuBar    
         *      
         * @return javax.swing.JMenuBar 
         */
        private JMenuBar getJJMenuBar() {
                if (jJMenuBar == null) {
                        jJMenuBar = new JMenuBar();
                        jJMenuBar.setPreferredSize(new Dimension(0, 25));
                        jJMenuBar.add(getJMenuArchivo());
                        jJMenuBar.add(getJMenuExportar());
                }
                return jJMenuBar;
        }

        /**
         * This method initializes jMenuArchivo 
         *      
         * @return javax.swing.JMenu    
         */
        private JMenu getJMenuArchivo() {
                if (jMenuArchivo == null) {
                        jMenuArchivo = new JMenu();
                        jMenuArchivo.setText("Archivo");
                }
                return jMenuArchivo;
        }

        public void open() {
                setVisible(true);
        }

        @Override
        public void update(Observable arg0, Object arg1) {
                if(String.valueOf(arg1).equalsIgnoreCase("ActualizarTabla")){
                        jTableOrdenes.updateUI();
                }
                if(String.valueOf(arg1).equalsIgnoreCase("ClienteSeleccionadoEnBuscar")){
                }               

        }

        public class MiRenderRepuestos extends DefaultTableCellRenderer
        {
           public Component getTableCellRendererComponent(JTable table,
              Object value,
              boolean isSelected,
              boolean hasFocus,
              int row,
              int column)
           {
              super.getTableCellRendererComponent (table, value, isSelected, hasFocus, row, column);
              
              if((row%2) == 0)
              {
                 this.setOpaque(true);
                 this.setBackground(new Color(255, 255, 200));
                 this.setForeground(Color.black);
              }
              else
              {
                 this.setBackground(Color.white);
                     this.setForeground(Color.black);
              }
              if(column <  3){
                  Component componente = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
                      ((JLabel)componente).setHorizontalAlignment(JLabel.CENTER);  
              }
              else{
                  Component componente = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
                      ((JLabel)componente).setHorizontalAlignment(JLabel.LEFT);  
              }
              
                return this;
           }
        }

        /**
         * This method initializes jSplitPaneResultados 
         *      
         * @return javax.swing.JSplitPane       
         */
        private JSplitPane getJSplitPaneResultados() {
                if (jSplitPaneResultados == null) {
                        jSplitPaneResultados = new JSplitPane();
                        jSplitPaneResultados.setPreferredSize(new Dimension(208, 20));
                        jSplitPaneResultados.setLeftComponent(getJPanelResultadosIzq());
                        jSplitPaneResultados.setRightComponent(getJPanelDerResultados());
                }
                return jSplitPaneResultados;
        }

        /**
         * This method initializes jPanelResultadosIzq  
         *      
         * @return javax.swing.JPanel   
         */
        private JPanel getJPanelResultadosIzq() {
                if (jPanelResultadosIzq == null) {
                        jLabelUsuarioLogueadoDato = new JLabel();
                        jLabelUsuarioLogueadoDato.setText("JLabel");
                        jLabelUsuarioLogueado = new JLabel();
                        jLabelUsuarioLogueado.setText("Usuario:     ");
                        jLabelResultadoCantidadRegistros = new JLabel();
                        jLabelResultadoCantidadRegistros.setText("JLabel");
                        jLabelCantidadRegistros = new JLabel();
                        jLabelCantidadRegistros.setText("Cantidad de Registros           ");
                        jPanelResultadosIzq = new JPanel();
                        jPanelResultadosIzq.setLayout(new GridBagLayout());
                        jPanelResultadosIzq.add(jLabelUsuarioLogueado, new GridBagConstraints());
                        jPanelResultadosIzq.add(jLabelUsuarioLogueadoDato, new GridBagConstraints());
                }
                return jPanelResultadosIzq;
        }

        /**
         * This method initializes jPanelDerResultados  
         *      
         * @return javax.swing.JPanel   
         */
        private JPanel getJPanelDerResultados() {
                if (jPanelDerResultados == null) {
                        GridLayout gridLayout1 = new GridLayout();
                        gridLayout1.setRows(1);
                        jPanelDerResultados = new JPanel();
                        jPanelDerResultados.setLayout(gridLayout1);
                        jPanelDerResultados.add(getJSplitPaneDerechoDerecho(), null);
                }
                return jPanelDerResultados;
        }

        /**
         * This method initializes jPanelResultados     
         *      
         * @return javax.swing.JPanel   
         */
        private JPanel getJPanelResultados() {
                if (jPanelResultados == null) {
                        GridBagConstraints gridBagConstraints = new GridBagConstraints();
                        gridBagConstraints.fill = GridBagConstraints.BOTH;
                        gridBagConstraints.weighty = 1.0;
                        gridBagConstraints.weightx = 1.0;
                        jPanelResultados = new JPanel();
                        jPanelResultados.setLayout(new GridBagLayout());
                        jPanelResultados.add(getJSplitPaneResultados(), gridBagConstraints);
                }
                return jPanelResultados;
        }

        /**
         * This method initializes jSplitPaneDerechoDerecho     
         *      
         * @return javax.swing.JSplitPane       
         */
        private JSplitPane getJSplitPaneDerechoDerecho() {
                if (jSplitPaneDerechoDerecho == null) {
                        jSplitPaneDerechoDerecho = new JSplitPane();
                        jSplitPaneDerechoDerecho.setLeftComponent(getJPanelDerechoDIqzq());
                        jSplitPaneDerechoDerecho.setRightComponent(getJPanelDerechoDer());
                }
                return jSplitPaneDerechoDerecho;
        }

        /**
         * This method initializes jPanelDerechoDIqzq   
         *      
         * @return javax.swing.JPanel   
         */
        private JPanel getJPanelDerechoDIqzq() {
                if (jPanelDerechoDIqzq == null) {
                        GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
                        gridBagConstraints1.gridx = -1;
                        gridBagConstraints1.gridy = -1;
                        jPanelDerechoDIqzq = new JPanel();
                        jPanelDerechoDIqzq.setLayout(new GridBagLayout());
                        jPanelDerechoDIqzq.setPreferredSize(new Dimension(750, 0));
                }
                return jPanelDerechoDIqzq;
        }

        /**
         * This method initializes jPanelDerechoDer     
         *      
         * @return javax.swing.JPanel   
         */
        private JPanel getJPanelDerechoDer() {
                if (jPanelDerechoDer == null) {
                        GridBagConstraints gridBagConstraints2 = new GridBagConstraints();
                        gridBagConstraints2.gridx = -1;
                        gridBagConstraints2.gridy = -1;
                        jPanelDerechoDer = new JPanel();
                        jPanelDerechoDer.setLayout(new GridBagLayout());
                        jPanelDerechoDer.add(jLabelCantidadRegistros, gridBagConstraints2);
                        jPanelDerechoDer.add(jLabelResultadoCantidadRegistros, gridBagConstraints2);
                }
                return jPanelDerechoDer;
        }

        /**
         * This method initializes jMenuExportar        
         *      
         * @return javax.swing.JMenu    
         */
        private JMenuItem getJMenuExportar() {
                if (jMenuExportar == null) {
                        jMenuExportar = new JMenuItem();
                        jMenuExportar.setText("Exportar a EXCEL");
//                        jMenuExportar.setIcon(new ImageIcon(getClass().getResource("/view/consultarOrdenes/apdnrfb_icono-excel.jpg")));
                        jMenuExportar.addActionListener(new ActionListener(){
                                @Override
                                public void actionPerformed(ActionEvent arg0) {
                                }
                        });
                }
                return jMenuExportar;
        }

		/**
		 * This method initializes jTxtRazonSocialDato	
		 * 	
		 * @return javax.swing.JTextField	
		 */
		private JTextField getJTxtRazonSocialDato() {
			if (jTxtRazonSocialDato == null) {
				jTxtRazonSocialDato = new JTextField();
				jTxtRazonSocialDato.setBounds(new Rectangle(163, 45, 109, 20));
			}
			return jTxtRazonSocialDato;
		}

		/**
		 * This method initializes jTxtTelefonoDato1	
		 * 	
		 * @return javax.swing.JTextField	
		 */
		private JTextField getJTxtTelefonoDato1() {
			if (jTxtTelefonoDato1 == null) {
				jTxtTelefonoDato1 = new JTextField();
				jTxtTelefonoDato1.setBounds(new Rectangle(392, 45, 96, 20));
			}
			return jTxtTelefonoDato1;
		}

		/**
		 * This method initializes mascara1	
		 * 	
		 * @return javax.swing.text.MaskFormatter	
		 * @throws ParseException 
		 */
		private MaskFormatter getMascara1() throws ParseException {
			if (mascara1 == null) {
				mascara1 = new MaskFormatter("##/##/####");
			}
			return mascara1;
		}

		/**
		 * This method initializes jPanelFechas	
		 * 	
		 * @return javax.swing.JPanel	
		 * @throws ParseException 
		 */
		private JPanel getJPanelFechas() throws ParseException {
			if (jPanelFechas == null) {
				jLabelHasta1 = new JLabel();
				jLabelHasta1.setBounds(new Rectangle(193, 28, 36, 16));
				jLabelHasta1.setText("Hasta");
				jLabelDesde = new JLabel();
				jLabelDesde.setBounds(new Rectangle(24, 27, 45, 16));
				jLabelDesde.setText("Desde");
				jPanelFechas = new JPanel();
				jPanelFechas.setLayout(null);
				jPanelFechas.setBounds(new Rectangle(22, 114, 374, 63));
				jPanelFechas.setBorder(BorderFactory.createTitledBorder(null, "Rango de fechas", TitledBorder.CENTER, TitledBorder.DEFAULT_POSITION, new Font("Dialog", Font.BOLD, 12), new Color(51, 51, 51)));
				jPanelFechas.add(jLabelDesde, null);
				jPanelFechas.add(getJTxtFechaDesde(), null);
				jPanelFechas.add(jLabelHasta1, null);
				jPanelFechas.add(getJTxtFechaHasta1(), null);
			}
			return jPanelFechas;
		}

		/**
		 * This method initializes mascara	
		 * 	
		 * @return javax.swing.text.MaskFormatter	
		 * @throws ParseException 
		 */
		private MaskFormatter getMascara() throws ParseException {
			if (mascara == null) {
				mascara = new MaskFormatter("##/##/####");
			}
			return mascara;
		}

		/**
		 * This method initializes jTxtFechaDesde	
		 * 	
		 * @return javax.swing.JFormattedTextField	
		 * @throws ParseException 
		 */
		private JFormattedTextField getJTxtFechaDesde() throws ParseException {
			if (jTxtFechaDesde == null) {
				jTxtFechaDesde = new JFormattedTextField(getMascara());
				jTxtFechaDesde.setBounds(new Rectangle(91, 25, 77, 20));
			}
			return jTxtFechaDesde;
		}

		/**
		 * This method initializes mascara2	
		 * 	
		 * @return javax.swing.text.MaskFormatter	
		 * @throws ParseException 
		 */
		private MaskFormatter getMascara2() throws ParseException {
			if (mascara2 == null) {
				mascara2 = new MaskFormatter("##/##/####");
			}
			return mascara2;
		}

		/**
		 * This method initializes mascara11	
		 * 	
		 * @return javax.swing.text.MaskFormatter	
		 */
		private MaskFormatter getMascara11() {
			if (mascara11 == null) {
				try {
					mascara11 = new MaskFormatter("##/##/####");
				} catch (ParseException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}
			return mascara11;
		}

		/**
		 * This method initializes jTxtFechaHasta1	
		 * 	
		 * @return javax.swing.JFormattedTextField	
		 */
		private JFormattedTextField getJTxtFechaHasta1() {
			if (jTxtFechaHasta1 == null) {
				jTxtFechaHasta1 = new JFormattedTextField(getMascara11());
				jTxtFechaHasta1.setBounds(new Rectangle(256, 27, 91, 20));
			}
			return jTxtFechaHasta1;
		}

		/**
		 * This method initializes jTxtDireccionDato11	
		 * 	
		 * @return javax.swing.JTextField	
		 */
		private JTextField getJTxtDireccionDato11() {
			if (jTxtDireccionDato11 == null) {
				jTxtDireccionDato11 = new JTextField();
				jTxtDireccionDato11.setBounds(new Rectangle(607, 46, 161, 20));
			}
			return jTxtDireccionDato11;
		}
        
        
}  //  @jve:decl-index=0:visual-constraint="57,122"